﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RowMaterialInventoryControlReport.aspx.cs" Inherits="MLY.Reports.DataReports.RowMaterialInventoryControlReport" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@ Register Assembly="DevExpress.Web.v11.1.Linq, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Data.Linq" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
  Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
  Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxPanel"
  TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxRoundPanel"
  TagPrefix="dx" %>
<%@ Register assembly="DevExpress.Web.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxLoadingPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v11.1.Export, Version=11.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView.Export" tagprefix="dx" %>


<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title><asp:Literal ID="TitleLiteral" Text="<%$ Dict:Reports.RowMaterialInventoryControl %>" runat="server"></asp:Literal></title>
    <link href="/Style/General_Style_v9.css" rel="stylesheet" type="text/css" />
    <link href="../../Style/ReportsStylesheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Label ID="titleLabel" runat="server" Text="<%$ Dict:Reports.RowMaterialInventoryControl %>" CssClass="TitleStyle"></asp:Label>
        
        <dx:ASPxGridView ID="RowMaterialInventoryControlReportGrid" runat="server"  
         DataSourceID="RowMaterialInventoryControlDataSource"
         EnableCallBacks="False" SettingsPager-RenderMode="Lightweight"
         EnableTheming="False" 
         KeyFieldName="CustomerWorkOrderNumber" 
         Settings-ShowFilterRow="true" 
         Settings-ShowGroupButtons="true"
         Settings-ShowFilterBar="Hidden" Settings-ShowFilterRowMenu="True" Settings-ShowGroupedColumns="True" Settings-ShowGroupPanel="True" Settings-UseFixedTableLayout="True">
        <SettingsBehavior AllowFocusedRow="True" ColumnResizeMode="NextColumn" AutoFilterRowInputDelay="2500"  />
        <SettingsPager RenderMode="Lightweight"></SettingsPager>
        <Styles Header-Wrap="True"></Styles>
        <Columns>
            <dx:GridViewDataTextColumn Caption="PART #" FieldName="CatalogueItemName"></dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="CUI CPN#" FieldName="CustomerCatalougeCode"></dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="ORDER NO" FieldName="CustomerWorkOrderNumber"></dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="QTY Ordered" FieldName="Quantity"></dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="QTY Delivered">
                <DataItemTemplate>
                    <asp:Label ID="QuantityDeliveredLabel" runat="server" Text='<%# GetQtyDelivered(Eval("WorkOrderId")) %>'></asp:Label>
                </DataItemTemplate>
            </dx:GridViewDataTextColumn>
            
            
        </Columns>
        </dx:ASPxGridView>
        <dx:ASPxGridViewExporter ID="gridExport" runat="server" GridViewID="RowMaterialInventoryControlReportGrid"></dx:ASPxGridViewExporter>
        <table cellpadding="5" cellspacing="0">
            <tr>
            <td>
                <dx:ASPxButton Id="ExportToXLS" runat="server" Text="Export to XLS" UseSubmitBehavior="False"
                    OnClick="btnXlsExport_Click"   ></dx:ASPxButton>
                                  
            </td>
            <td>
                <dx:ASPxButton Id="ExportToXLSx" runat="server" Text="Export to XLSx" UseSubmitBehavior="False"
                    OnClick="btnXlsxExport_Click"></dx:ASPxButton>
            </td>
            <td>
                <dx:ASPxButton Id="ExportToPDF" runat="server" Text="Export to PDF" UseSubmitBehavior="False"
                    OnClick="btnPdfExport_Click"></dx:ASPxButton>
            </td>
            </tr>
        </table>
        
        <asp:SqlDataSource ID="RowMaterialInventoryControlDataSource" runat="server" SelectCommandType="StoredProcedure"
        ConnectionString="<%$ ConnectionStrings:MLYConnectionString %>" SelectCommand="SCCover_RowMaterialInventoryControl"></asp:SqlDataSource> 
    </div>
    </form>
</body>
</html>
